package cn.gson.boot.model.dao;

import cn.gson.boot.model.pojos.Jiaofujihua;
import cn.gson.boot.model.pojos.Jiaofujilu;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import javax.transaction.Transactional;

public interface JiaoFuJiLuLuLuDao extends CrudRepository<Jiaofujilu,Integer> {

    //移除交付记录（逻辑删除）
    @Transactional
    @Modifying(clearAutomatically = true)
    @Query(nativeQuery = true,value = "update jiaofujilu set jl_ys=0 where jl_id=?1")
    public void yichuJiaoFuJiLu(Integer jlId);

}
